// import './register-components';
// import './register-plugins';
// PS: ts不支持全局注入register-components or register-plugins
// import "./register-filter.js"; // ts中filter全局引用目前还没找到办法
//兼容ie 需要npm install core-js，regenerator-runtime
import "core-js/stable";
import "regenerator-runtime/runtime";
import Vue from "vue";
import App from "./App.vue";
import router from "./router/index";
import store from "./store/index";
import iview from "iview";
import "iview/dist/styles/iview.css";
import SliderDrag from "./packages";
import vpay from "myplugin-vue";
import "myplugin-vue/lib/myplugin-vue.css";
import alter from "@components/iv-modal/alter.js";
import LoadPlugin from "@/components/iv-loading";
//自定义指令
import importDirective from "@/directive";

// import Vfilters from "@filters/filter.ts";
import "@assets/iconfont/iconfont.css";
import "stylus/global.styl";
import "@babel/polyfill"; /*npm i --save @babel/polyfill,添加 IE 兼容,配置 babel.config.js*/
Vue.config.productionTip = false;
Vue.config.devtools = false;
import "@/icons"; //引入svg矢量图

//调试 template
Vue.prototype.$log = window.console.log;
//全局注入Alter弹框提示
Vue.prototype.$BaseAlter = alter; //注入的组件名一样

/**
 * 开启性能追踪模式:
 *  const isDev = process.env.NODE_ENV !== "production";
 *  Vue.config.performance = isDev;
 */
//全局过滤器
// for (const key in Vfilters) {
//     Vue.filter(key, Vfilters[key]);
// }
Vue.use(iview);
Vue.use(SliderDrag); //单个注入到项目中，也可以发布到npm上，使用npm install --save安装
 Vue.use(LoadPlugin);
Vue.use(vpay);

importDirective(Vue);

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
